idmapper
Table Name: idmapper
The idmapper table acts as a centralized mapping mechanism for assigning unique identifiers (mappedId) to various entities or records within the system. It links these entities to specific roles via the roleId.
Columns
| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| mappedId | int(11) | Primary Key, Auto Increment | A unique, system-generated identifier for each record. |
| roleId | smallint(6) | Not Null, Foreign Key | Identifier that links to a specific role in the role table, defining the type or category of the entity. |
Indexes
- Primary Key: mappedId
- Ensures each record has a unique identifier.
- Foreign Key Index: idmapper_roleId_Role_roleId_FK
- Index on roleId to optimize lookups and enforce referential integrity.
Foreign Key Relationships
- role table:
- The roleId column references role(roleId), establishing a relationship that categorizes entities by their roles.
- Ensures that only valid roles (defined in the role table) are assigned to records in the idmapper table.
Usage Notes
- Purpose:
- The idmapper table provides a unique identifier (mappedId) for various entities, which can then be referenced across different tables in the database.
- Acts as a central registry for linking entities to specific roles or categories.
- Auto-Increment:
- The mappedId column automatically increments for each new record, ensuring system-wide uniqueness.
- Integration:
- This table is often referenced by other tables (e.g., child) to ensure consistency and maintain a clear relationship hierarchy.
- Role Management:
- The roleId is used to specify the type or category of an entity, which is managed and validated via the role table.